package com.qf.service;

import com.qf.service.impl.UserServiceimpl;
import com.qf.vo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: 你的名字
 * @Date: 2021/07/05/18:50
 * @Description:
 */
@FeignClient(name ="shop-user",path = "/user",fallback = UserServiceimpl.class)
public interface UserSevice {
    @RequestMapping("/userList")
    public List<User> getUserList();
    @RequestMapping ("/addUser")
    public boolean addUser(@RequestBody User user);
    @RequestMapping(value = "/delUser/{id}")
    public boolean delUser(@PathVariable(value = "id") Integer id);
    @RequestMapping("queryUser")
    public List<User> queryUserList(User user);
    @RequestMapping(value = "getUserById/{id}")
    public  User getUserById(@PathVariable(value = "id") Integer id);
    @RequestMapping("/updateUser")
    public boolean updatUser(User user);
}
